package com.scs.application.core.process.interceptor;

import com.scs.application.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * @Description: 流程拦截器
 */
@Slf4j
public class ProcessInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        boolean inFlow = StringUtils.isNotBlank("");


        // 判断是否是流程请求
        if(inFlow){
            return invocation.proceed();
        }

        // execution before process


        Object result = invocation.proceed();

        // execution after process

        return result;
    }
}
